/*
 * Copyright 2013-2015 the original author or authors.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.xdtech.coder.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.xdtech.core.model.BaseModel;

/**
 * 
 * @author max.zheng
 * @create 2016-3-1下午11:51:36
 * @since 1.0
 * @see
 */
@Entity
@Table(name="CODER_MODEL_TABLE_MAPPED")
public class ModelTableMapped extends BaseModel implements Serializable
{
	private static final long serialVersionUID = 1L;
	@Id
    @Column(name = "MAPPED_ID")
    @GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	
	@Column(name="MAPPED_TYPE")
	private String mappedType;
	//映射关系表
	@Column(name="MAPPED_BY")
	private String mappedBy;
	//映射关系模型
	@Column(name="MAPPED_BY_MODEL")
	private String mappedByModel;
	
	@ManyToOne
	@JoinColumn(name="TABLE_ID")
	private ModelTable modelTable;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getMappedBy() {
		return mappedBy;
	}

	public void setMappedBy(String mappedBy) {
		this.mappedBy = mappedBy;
	}

	public String getMappedType() {
		return mappedType;
	}

	public void setMappedType(String mappedType) {
		this.mappedType = mappedType;
	}

	public ModelTable getModelTable() {
		return modelTable;
	}

	public void setModelTable(ModelTable modelTable) {
		this.modelTable = modelTable;
	}


	public String getMappedByModel() {
		return mappedByModel;
	}

	public void setMappedByModel(String mappedByModel) {
		this.mappedByModel = mappedByModel;
	}
	
	
	
}
